package com.it.you.base.bigdecimal;

import com.it.you.common.utils.Conv;

import java.math.RoundingMode;

public class BigDecimalUtils {

    //格式化金额
    public static String stripTrailingZeros(Object sourceObj,int scale, RoundingMode roundingMode){
        return Conv.asDecimal(sourceObj).setScale(scale,roundingMode).stripTrailingZeros().toPlainString();
    }

}
